home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Prg / DEPAL.ZIP / SOURCE.ZIP / COMPAL.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1995-03-19  |  2.4 KB  |  93 lines

  1. VERSION 2.00
  2. Begin Form ComPal 
  3.    BackColor       =   &H00E0E0E0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Common"
  6.    ClientHeight    =   3975
  7.    ClientLeft      =   3510
  8.    ClientTop       =   870
  9.    ClientWidth     =   4230
  10.    Height          =   4665
  11.    Left            =   3450
  12.    LinkTopic       =   "Form2"
  13.    ScaleHeight     =   3975
  14.    ScaleWidth      =   4230
  15.    Top             =   240
  16.    Width           =   4350
  17.    Begin CheckBox ckTop 
  18.       Caption         =   "Top"
  19.       FontBold        =   -1  'True
  20.       FontItalic      =   0   'False
  21.       FontName        =   "MS Sans Serif"
  22.       FontSize        =   9.75
  23.       FontStrikethru  =   0   'False
  24.       FontUnderline   =   0   'False
  25.       Height          =   315
  26.       Left            =   3360
  27.       TabIndex        =   0
  28.       Top             =   120
  29.       Width           =   795
  30.    End
  31.    Begin XPAL Pal 
  32.       Height          =   3390
  33.       IDP             =   18768
  34.       Left            =   60
  35.       System          =   0   'False
  36.       Top             =   540
  37.       Width           =   4110
  38.    End
  39.    Begin Menu M_file 
  40.       Caption         =   "File"
  41.       Begin Menu M_read 
  42.          Caption         =   "Read"
  43.       End
  44.       Begin Menu M_write 
  45.          Caption         =   "Write"
  46.       End
  47.    End
  48.    Begin Menu M_image 
  49.       Caption         =   "Image"
  50.    End
  51.    Begin Menu M_shift 
  52.       Caption         =   "Shift"
  53.    End
  54. Option Explicit
  55. Sub ckTop_Click ()
  56.     Me.SetFocus
  57.     Call TopMost(Me.hWnd, ckTop)
  58. End Sub
  59. Sub M_image_Click ()
  60.     Dim n As Integer
  61.     For n = 0 To 255
  62.         Pal.Cindex = n
  63.         DibPal!Pal.Cindex = n
  64.         Pal.Color = DibPal!Pal.Color
  65.     Next n
  66. End Sub
  67. Sub M_read_Click ()
  68.     Dim filename As String
  69.     filename = InputBox$("Enter File Name")
  70.     If filename = "" Then Exit Sub
  71.     Call ReadPalette(Pal, filename)
  72. End Sub
  73. Sub M_shift_Click ()
  74.     Dim n As Integer
  75.     Dim Color As Long
  76.     For n = 245 To 0 Step -1
  77.         Pal.Cindex = n
  78.         Color = Pal.Color
  79.         Pal.Cindex = n + 10
  80.         Pal.Color = Color
  81.     Next n
  82.     For n = 0 To 9
  83.         Pal.Cindex = n
  84.         Pal.Color = 0
  85.     Next n
  86. End Sub
  87. Sub M_write_Click ()
  88.     Dim filename As String
  89.     filename = InputBox$("Enter File Name")
  90.     If filename = "" Then Exit Sub
  91.     Call WritePalette(Pal, filename)
  92. End Sub
  93.